<template>
  <div class="collectsWrapper">
    <div class="collectListWrapper">
      <checkboxGroup v-model="selectIds">
        <CollectItem
          v-for="collect in 6"
          :key="collect"
          @dx="batchStatus = true"
          :showSelect="batchStatus"
        />
      </checkboxGroup>
    </div>
    <div class="manageWrapper" v-if="batchStatus">
      <div class="op">
        <div class="icon"><RollbackOutlined :style="{ fontSize: '20px' }" /></div>
        <span>逐条转发</span>
      </div>
      <div class="op">
        <div class="icon"><DeleteOutlined :style="{ fontSize: '20px' }" /></div>
        <span>删除</span>
      </div>
      <CloseOutlined class="closeIcon" @click="cannceBatch" />
    </div>
  </div>
</template>
<script lang="ts" setup>
// 导入工具
import { ref, reactive } from 'vue'
// 导入组件
import { CheckboxGroup } from 'ant-design-vue'
import { DeleteOutlined, RollbackOutlined, CloseOutlined } from '@ant-design/icons-vue'
import CollectItem from '@/components/CollectItem.vue'
// 定义属性
const batchStatus = ref<Boolean>(false)
const selectIds = ref<Array<String>>([])
const starList = reactive([{}])
// 定义方法
const cannceBatch = () => {
  selectIds.value = []
  batchStatus.value = false
}
</script>
<style lang="less" scoped>
.collectsWrapper {
  height: 100%;
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 20px 0 0 0;
  border-top: 1px solid #dfdfdf;

  .collectListWrapper {
    padding: 0px 10px;
    flex: 1;
  }
  .manageWrapper {
    height: 130px;
    width: 100%;
    border-top: 0.5px solid #e7e7e7;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    position: relative;
    .op {
      text-align: center;
      .icon {
        width: 50px;
        height: 50px;
        background-color: white;
        border-radius: 44px;
        margin-bottom: 10px;
        line-height: 50px;
        text-align: center;
      }
      span {
        font-size: 14px;
        color: #000;
        margin-top: 10px;
      }
    }
    .closeIcon {
      position: absolute;
      right: 1%;
      top: 8%;
      color: #787878;
      &:hover {
        color: #ccc;
      }
    }
  }
}
</style>
